import http from '../request.js'

// 获取手术列表
let operationGetList = (url, params) => {
    return http.req(
        'get',
        url = 'arch/operation/getList',
        params,
        null
    )
}

// 获取手术信息
let operationGetInfo = (url, operationId) => {
    return http.req(
        'get',
        url = 'arch/operation/getInfo?operationId='+operationId,
        null,
        null
    )
}

// 获取手术数量
let operationgetNum = (url, filter) => {
    return http.req(
        'get',
        url = 'arch/operation/getNum?filter=' + filter,
        null,
        null
    )
}

// 手术资料列表
let operationFileGetList = (url, params) => {
    return http.req(
        'get',
        url = 'arch/operationFile/getList',
        params,
        null
    )
}

// 批量删除手术资料
let operationFileRemoveAll = (url, data) => {
    return http.req(
        'delete',
        url = 'arch/operationFile/removes',
        null,
        data
    )
}

// 删除手术资料
let operationFileRemove = (url, fileId) => {
    return http.req(
        'delete',
        url = 'arch/operationFile/remove?fileId='+fileId ,
        null,
        null
    )
}

// 批量下载手术资料
let operationFiledownloadAll = (url, data, responseType) => {
    return http.req1(
        'post',
        url = 'arch/operationFile/downloads',
        null,
        data,
        'blob'
    )
}

// 下载手术资料
let operationFiledownload = (url, fileId, responseType) => {
    return http.req1(
        'post',
        url = 'arch/operationFile/download?fileId='+fileId,
        null,
        null,
        'blob'
    )
}

// 导入手术资料
let importOperationFile = (url, data) => {
    return http.req(
        'post',
        url = 'arch/operationFile/import',
        null,
        data
    )
}

// 视频剪辑
let videoMontage = (url, data) => {
    return http.req(
        'post',
        url = 'arch/operationFile/montage',
        null,
        data
    )
}

// 预览手术资料
let previewFile = (url, fileId) => {
    return http.req(
        'post',
        url = 'arch/operationFile/preview?fileId='+fileId,
        null,
        null
    )
}

// 删除预览手术资料
let removePreview = (url, fileId) => {
    return http.req(
        'delete',
        url = 'arch/operationFile/removePreview?fileId='+fileId ,
        null,
        null
    )
}

// 评估列表
let getAssessmentList = (url,params) => {
    return http.req(
        'get',
        url = 'arch/operationAssess/getList' ,
        params,
        null
    )
}

// 评估保存
let assessmentSave = (url,data) => {
    return http.req(
        'post',
        url = 'arch/operationAssess/save' ,
        null,
        data
    )
}

// 导出
let assessmentExport = (url,operationId, responseType) => {
    return http.req1(
        'post',
        url = 'arch/operationAssess/export?operationId='+operationId,
        null,
        null,
        'blob'
    )
}

// 手术核查配置列表
let operationCheckConfig = (url) => {
    return http.req(
        'get',
        url = 'arch/operationCheckConfig/getList',
        null,
        null
    )
}

// 手术核查信息
let operationCheckInfo = (url,operationId) => {
    return http.req(
        'get',
        url = 'arch/operationCheck/getInfo?operationId='+operationId,
        null,
        null
    )
}

// 手术核查保存
let operationCheckSave = (url,data) => {
    return http.req(
        'put',
        url = 'arch/operationCheck/check',
        null,
        data
    )
}

export default {
    operationGetList,
    operationGetInfo,
    operationgetNum,
    operationFileGetList,
    operationFileRemoveAll,
    operationFileRemove,
    operationFiledownloadAll,
    operationFiledownload,
    importOperationFile,
    videoMontage,
    previewFile,
    removePreview,
    getAssessmentList,
    assessmentSave,
    assessmentExport,
    operationCheckConfig,
    operationCheckInfo,
    operationCheckSave
}